python graph data structure example